1. Field of the Invention
The present invention relates to a computer system, and deals more particularly with a method, system, and computer program product for performing address resolution in an ad-hoc networking environment.
2. Description of the Related Art
Ad-hoc networking, whereby small peer-to-peer networks are established without the communicating devices necessarily having a priori knowledge of one another, is becoming increasingly popular. This method of networking is often used for communications between mobile devices, where one mobile device may learn of a second mobile device by detecting the second device""s transmission signals when the two devices are located within an appropriate physical proximity of one another. Networks where one or more devices are mobile and another is stationary, networks within small offices, networks in the home, and networks within businesses such as hotels arc additional environments where this type of networking is advantageous.
Examples of ad-hoc networking applications involving at least one mobile (i.e. roaming) device include presenting content- and location-sensitive information such as music, voice, or diagrams to a user wandering through a museum exhibit or trade fair kiosk. Or, targeted advertisements for products in a store could be presented as the shopper approaches the product, tailored to the consumer""s past buying behavior, age, or other preferences. A highway driver could be notified of traffic jams ahead and given information about detours based on the user""s ultimate destination. A user could select a personal xe2x80x9cmusic streamxe2x80x9d to be constantly delivered to the user""s personal device as the user roams. A student driving through a campus parking lot may establish an ad-hoc connection from his or her mobile computing device to a campus server that maintains information about available parking spaces, such that the driver can be directed toward an available space instead of driving around and around, wasting time and gasoline. Many other such examples can be imagined.
In this type of ad-hoc networking environment, devices often communicate using the Internet Protocol, or xe2x80x9cIPxe2x80x9d. The devices which dynamically attach to an ad-hoc network tend to remain attached for varying lengths of time. Each such device must obtain a network address (such as an IP address), if it has not already been configured with one, in order to participate in network communications. Application programs written for IP networking typically expect to refer to other computing devices using the target device""s host name, as opposed to using the target device""s IP address. Thus, it is necessary to determine the IP address of a target device (using that device""s host name to access a lookup table, for example) before messages can be exchanged between the applications residing on the devices. In conventional networking environments, an address assignment service and/or an address resolution service are typically available for these purposes. A DHCP (Dynamic Host Configuration Protocol) server, e.g., may be contacted by a device that wishes to receive an address assignment. A DNS (Domain Name System) server may be contacted to determine a target device""s IP address using its known host name. These services may not be available in the ad-hoc networking environment, however, and therefore alternatives techniques are required.
One alternative way of learning the IP address of a target device is to statically pre-configure that information into each device that may need to communicate with this target device (and/or its resident applications), and then to consult this pre-configured information. This approach, however, is very labor-intensive, tedious, and error prone. In addition, this type of configuration of devices typically requires a skilled network administrator, and is therefore not well suited to environmentsxe2x80x94such as the in-home networking environmentxe2x80x94where these administrator skills are not available. Furthermore, as devices become more portable and therefore are increasingly used in mobile environments, it is not realistic to expect that the static pre-configured information will be sufficient for communicating with the many devices which may be encountered by a roaming device.
If one accepts the premise that any kind of static pre-configuration requirement is therefore unacceptable, and/or that a solution relying on statically pre-configured information is inadequate, then there are several related unresolved problems faced by devices which need to communicate in ad-hoc IP networks. First, a device operating in this environment must choose an IP address even though it is using IP in disconnected mode (i.e. disconnected from a traditional network in which address assignment services are available), in order to participate in communications using IP. Second, a device must have a way of resolving another device""s host name to its IP address, in order to communicate with applications operating on that other device. Third, a device must be capable of resolving a target IP address to a Layer 2 connection (i.e. to determine the appropriate interface to be used within a device for communicating with a target device).
A technique for addressing the first of these problems exists in the prior art. The Internet Engineering Task Force (IETF) Draft titled xe2x80x9cAutomatically Choosing an IP Address in an Ad-Hoc IPv4 Networkxe2x80x9d describes a technique for automatically choosing an available IP address for oneself from the IANA (Internet Assigned Numbers Authority) reserved xe2x80x9cLINKLOCALxe2x80x9d subnet when isolated from normal network services (e.g. for devices operating on a home network that is temporarily disconnected from the Internet). This LINKLOCAL subnet uses addresses in the range from 169.254.1.0 through 169.254.254.255, providing in excess of 65,000 potential address choices. This draft specification states that addresses must be chosen at random from this reserved address range, and further defines techniques for dynamically determining whether a randomly-selected address is indeed available for use. (Refer to Internet location http:/www.ietf.org/internet-drafts/draft-ietf-dhc-ipv4-autoconfig-04.txt for more information on this IETF Draft.) However, this approach has several shortcomings. When a device having an auto-configured IP address connects to a network which has a DHCP server available, it is necessary for the device to cease using its auto-configured address and use a xe2x80x9crealxe2x80x9d administered address instead. This is necessary because the auto-configured subnetwork (or xe2x80x9csubnetxe2x80x9d) address will be topologically incorrect for communicating with other devices that are connected to the same subnet and which have obtained administered addresses, preventing communication with these devices. In addition, there is currently no convenient trigger that indicates to an auto-configured device that it should release its existing address and obtain an administered address.
Accordingly, what is needed is a technique with which the above-described inadequacies in the current art can be overcome.
An object of the present invention is to provide a technique for improving address resolution in ad-hoc networking environments.
Another object of the present invention is to provide this technique in a manner that enables a device to communicate its IP address and the source of that address.
Yet another object of the present invention is to provide this technique whereby a device may receive information about other devices"" IP addresses and the source of those addresses, and efficiently use this information for communicating with such devices.
Still another object of the present invention is to provide this technique by augmenting an existing service discovery protocol.
Other objects and advantages of the present invention will be set forth in part in the description and in the drawings which follow and, in part, will be obvious from the description or may be learned by practice of the invention.
To achieve the foregoing objects, and in accordance with the purpose of the invention as broadly described herein, the present invention provides a method, system, and computer program product for address resolution in an ad-hoc networking environment. In a first aspect, this technique comprises: sending a first service discovery message from a first device to a second device, wherein the first service discovery message is augmented with Internet Protocol (IP) address information and address source indicators pertaining to the first device; receiving the first service discovery message by the second device; storing the IP address information and the address source indicators at the second device; and using the IP address informnation and the address source indicators stored at the second device for communicating from the second device to the first device in the ad-hoc networking environment.
This technique may further comprise: sending a second service discovery message from the second device to the first device, wherein the second service discovery message is augmented with the IP address information and the address source indicators pertaining to the second device; receiving the second service discovery message by the first device; storing the IP address information and the address source indicators at the first device; and using the IP address information and the address source indicators stored at the first device for communicating from the first device to the second device in the ad-hoc networking environment.
The IP address information preferably further comprises an IP host name, an IP address, an IP subnetwork address, and an IP subnetwork mask. The address source indicators preferably comprise a first indicator which indicates whether the IP address was self-assigned and a second indicator which indicates whether the IP address was administratively configured or assigned by an address assignment service.
The technique may further comprise: comparing a remote IP address from the received IP address information to a local IP address of the second device to determine whether the local IP address needs to be changed; and changing, based upon a result of the comparison, the local IP address.
The first and second service discovery messages may be Bluetooth Service Discovery Protocol messages, Service Location Protocol messages, or Simple Service Discovery Protocol messages.
In another aspect, this technique comprises: sending an inquiry message from a first device to a second device; receiving the inquiry message by the second device; sending an inquiry response message from the second device to the first device, wherein the inquiry response message is augmented with address source indicators pertaining to the second device; receiving the inquiry response message by the first device; sending IP address information from the second device to the first device; receiving the IP address information by the first device; storing the address source indicators at the first device; storing the IP address information at the first device; and using the IP address information and the address source indicators stored at the first device for communicating from the first device to the second device in the ad-hoc networking environment.
In this aspect, the IP address information preferably comprises an IP host name, an IP address, an IP subnetwork address, and an IP subnetwork mask, and the address source indicators preferably comprise a first indicator which indicates whether the IP address was self-assigned and a second indicator which indicates whether the IP address was administratively configured or assigned by an address assignment service. The IP address information may be communicated in the inquiry response message, or it may be communicated in a message distinct from the inquiry response message.